#ifndef _DAG_RESOURCE_ANALYZER_H_
#define _DAG_RESOURCE_ANALYZER_H_

#include "dag.h"
#include <list>
#include <set>

namespace dag {

	class DAG_LOCAL ResourceAnalyzer {
	public:
		ResourceAnalyzer();
		virtual ~ResourceAnalyzer() throw();
		void checkResources(const Graph& graph, std::list<GraphError>& errors);
	private:
		bool pathRecurseForward(const Graph& graph, 
								const Node& node, 
								bool blocked,
								std::list<GraphError>& errors);

		bool pathRecurseReverse(const Graph& graph, 
								const Node& node, 
								bool blocked,
								std::list<GraphError>& errors);
		std::set<const Node*> m_Visited;
	};
}
#endif